<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>CesiumVectorTile参考文档: Global</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Global</h1>

    




<section>

<header>
    
        <h2>
        
        </h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

        


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


        
    
    </div>

    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="bbox"><span class="type-signature"></span>bbox<span class="type-signature"></span></h4>




<div class="description">
    Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1076">line 1076</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt1 = turf.point([114.175329, 22.2524])
var pt2 = turf.point([114.170007, 22.267969])
var pt3 = turf.point([114.200649, 22.274641])
var pt4 = turf.point([114.200649, 22.274641])
var pt5 = turf.point([114.186744, 22.265745])
var features = turf.featureCollection([pt1, pt2, pt3, pt4, pt5])

var bbox = turf.bbox(features);

var bboxPolygon = turf.bboxPolygon(bbox);

//=bbox

//=bboxPolygon</code></pre>



        
            
<h4 class="name" id="bbox"><span class="type-signature"></span>bbox<span class="type-signature"></span></h4>




<div class="description">
    Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9493">line 9493</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt1 = turf.point([114.175329, 22.2524])var pt2 = turf.point([114.170007, 22.267969])var pt3 = turf.point([114.200649, 22.274641])var pt4 = turf.point([114.200649, 22.274641])var pt5 = turf.point([114.186744, 22.265745])var features = turf.featureCollection([pt1, pt2, pt3, pt4, pt5])var bbox = turf.bbox(features);var bboxPolygon = turf.bboxPolygon(bbox);//=bbox//=bboxPolygon</code></pre>



        
            
<h4 class="name" id="bbox-clip"><span class="type-signature"></span>bbox-clip<span class="type-signature"></span></h4>




<div class="description">
    Takes a Feature and a bbox and clips the feature to the bbox using [lineclip](https://github.com/mapbox/lineclip).May result in degenerate edges when clipping Polygons.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line8938">line 8938</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var bbox = [0, 0, 10, 10];var poly = {  "type": "Feature",  "properties": {},  "geometry": {    "type": "Polygon",    "coordinates": [[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]  }}var clipped = turf.bboxClip(poly, bbox);//=clipped</code></pre>



        
            
<h4 class="name" id="bbox-clip"><span class="type-signature"></span>bbox-clip<span class="type-signature"></span></h4>




<div class="description">
    Takes a Feature and a bbox and clips the feature to the bbox using [lineclip](https://github.com/mapbox/lineclip).
May result in degenerate edges when clipping Polygons.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line521">line 521</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var bbox = [0, 0, 10, 10];
var poly = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]
  }
}

var clipped = turf.bboxClip(poly, bbox);

//=clipped</code></pre>



        
            
<h4 class="name" id="bearingToAzimuth"><span class="type-signature"></span>bearingToAzimuth<span class="type-signature"></span></h4>




<div class="description">
    Converts any bearing angle from the north line direction (positive clockwise)
and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2333">line 2333</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="buffer"><span class="type-signature"></span>buffer<span class="type-signature"></span></h4>




<div class="description">
    Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1119">line 1119</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Point",
    "coordinates": [-90.548630, 14.616599]
  }
};
var unit = 'miles';

var buffered = turf.buffer(pt, 500, unit);
var result = turf.featureCollection([buffered, pt]);

//=result</code></pre>



        
            
<h4 class="name" id="center"><span class="type-signature"></span>center<span class="type-signature"></span></h4>




<div class="description">
    Takes a Feature or FeatureCollection and returns the absolute center point of all features.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1361">line 1361</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.522259, 35.4691]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.502754, 35.463455]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.508269, 35.463245]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.516809, 35.465779]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.515372, 35.467072]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.509363, 35.463053]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.511123, 35.466601]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.518547, 35.469327]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.519706, 35.469659]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.517839, 35.466998]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.508678, 35.464942]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-97.514914, 35.463453]
      }
    }
  ]
};

var centerPt = turf.center(features);
centerPt.properties['marker-size'] = 'large';
centerPt.properties['marker-color'] = '#000';

var resultFeatures = features.features.concat(centerPt);
var result = {
  "type": "FeatureCollection",
  "features": resultFeatures
};

//=result</code></pre>



        
            
<h4 class="name" id="centroid"><span class="type-signature"></span>centroid<span class="type-signature"></span></h4>




<div class="description">
    Takes one or more features and calculates the centroid using
the mean of all vertices.
This lessens the effect of small islands and artifacts when calculating
the centroid of a set of polygons.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1483">line 1483</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [105.818939,21.004714],
      [105.818939,21.061754],
      [105.890007,21.061754],
      [105.890007,21.004714],
      [105.818939,21.004714]
    ]]
  }
};

var centroidPt = turf.centroid(poly);

var result = {
  "type": "FeatureCollection",
  "features": [poly, centroidPt]
};

//=result</code></pre>



        
            
<h4 class="name" id="collectionOf"><span class="type-signature"></span>collectionOf<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of FeatureCollection inputs for Turf.
Internally this uses <a href="global.html#geojsonType">geojsonType</a> to judge geometry types.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2749">line 2749</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="collectionOf"><span class="type-signature"></span>collectionOf<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of FeatureCollection inputs for Turf.Internally this uses <a href="global.html#geojsonType">geojsonType</a> to judge geometry types.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9454">line 9454</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="collectionOf"><span class="type-signature"></span>collectionOf<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of FeatureCollection inputs for Turf.
Internally this uses <a href="global.html#geojsonType">geojsonType</a> to judge geometry types.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1037">line 1037</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="containsNumber"><span class="type-signature"></span>containsNumber<span class="type-signature"></span></h4>




<div class="description">
    Checks if coordinates contains a number
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line979">line 979</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="containsNumber"><span class="type-signature"></span>containsNumber<span class="type-signature"></span></h4>




<div class="description">
    Checks if coordinates contains a number
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2693">line 2693</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="containsNumber"><span class="type-signature"></span>containsNumber<span class="type-signature"></span></h4>




<div class="description">
    Checks if coordinates contains a number
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9396">line 9396</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="convex"><span class="type-signature"></span>convex<span class="type-signature"></span></h4>




<div class="description">
    Takes a Feature or a FeatureCollection and returns a convex hull Polygon.

Internally this uses
the [convex-hull](https://github.com/mikolalysenko/convex-hull) module that
implements a [monotone chain hull](http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain).
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1532">line 1532</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var points = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [10.195312, 43.755225]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [10.404052, 43.8424511]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [10.579833, 43.659924]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [10.360107, 43.516688]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [10.14038, 43.588348]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [10.195312, 43.755225]
      }
    }
  ]
};

var hull = turf.convex(points);

var resultFeatures = points.features.concat(hull);
var result = {
  "type": "FeatureCollection",
  "features": resultFeatures
};

//=result</code></pre>



        
            
<h4 class="name" id="coordAll"><span class="type-signature"></span>coordAll<span class="type-signature"></span></h4>




<div class="description">
    Get all coordinates from any GeoJSON object.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10410">line 10410</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};var coords = turf.coordAll(features);//=coords</code></pre>



        
            
<h4 class="name" id="coordAll"><span class="type-signature"></span>coordAll<span class="type-signature"></span></h4>




<div class="description">
    Get all coordinates from any GeoJSON object.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4692">line 4692</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
  turf.point([26, 37], {foo: 'bar'}),
  turf.point([36, 53], {hello: 'world'})
]);

var coords = turf.coordAll(features);
//= [[26, 37], [36, 53]]</code></pre>



        
            
<h4 class="name" id="coordAll"><span class="type-signature"></span>coordAll<span class="type-signature"></span></h4>




<div class="description">
    Get all coordinates from any GeoJSON object.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3405">line 3405</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
var coords = turf.coordAll(features);
//=coords</code></pre>



        
            
<h4 class="name" id="coordAll"><span class="type-signature"></span>coordAll<span class="type-signature"></span></h4>




<div class="description">
    Get all coordinates from any GeoJSON object.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11320">line 11320</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};var coords = turf.coordAll(features);//=coords</code></pre>



        
            
<h4 class="name" id="coordEach"><span class="type-signature"></span>coordEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10878">line 10878</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.coordEach(features, function (currentCoords, currentIndex) {  //=currentCoords  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="coordEach"><span class="type-signature"></span>coordEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4332">line 4332</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
  turf.point([26, 37], {"foo": "bar"}),
  turf.point([36, 53], {"hello": "world"})
]);

turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  //=currentCoord
  //=coordIndex
  //=featureIndex
  //=multiFeatureIndex
  //=geometryIndex
});</code></pre>



        
            
<h4 class="name" id="coordEach"><span class="type-signature"></span>coordEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9974">line 9974</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.coordEach(features, function (currentCoords, currentIndex) {  //=currentCoords  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="coordEach"><span class="type-signature"></span>coordEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2969">line 2969</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.coordEach(features, function (currentCoords, currentIndex) {
  //=currentCoords
  //=currentIndex
});</code></pre>



        
            
<h4 class="name" id="coordReduce"><span class="type-signature"></span>coordReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce coordinates in any GeoJSON object, similar to Array.reduce()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4476">line 4476</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
  turf.point([26, 37], {"foo": "bar"}),
  turf.point([36, 53], {"hello": "world"})
]);

turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  //=previousValue
  //=currentCoord
  //=coordIndex
  //=featureIndex
  //=multiFeatureIndex
  //=geometryIndex
  return currentCoord;
});</code></pre>



        
            
<h4 class="name" id="coordReduce"><span class="type-signature"></span>coordReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce coordinates in any GeoJSON object, similar to Array.reduce()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3096">line 3096</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.coordReduce(features, function (previousValue, currentCoords, currentIndex) {
  //=previousValue
  //=currentCoords
  //=currentIndex
  return currentCoords;
});</code></pre>



        
            
<h4 class="name" id="coordReduce"><span class="type-signature"></span>coordReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce coordinates in any GeoJSON object, similar to Array.reduce()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10101">line 10101</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.coordReduce(features, function (previousValue, currentCoords, currentIndex) {  //=previousValue  //=currentCoords  //=currentIndex  return currentCoords;});</code></pre>



        
            
<h4 class="name" id="coordReduce"><span class="type-signature"></span>coordReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce coordinates in any GeoJSON object, similar to Array.reduce()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11006">line 11006</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.coordReduce(features, function (previousValue, currentCoords, currentIndex) {  //=previousValue  //=currentCoords  //=currentIndex  return currentCoords;});</code></pre>



        
            
<h4 class="name" id="degreesToRadians"><span class="type-signature"></span>degreesToRadians<span class="type-signature"></span></h4>




<div class="description">
    Converts an angle in degrees to radians
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2363">line 2363</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="difference"><span class="type-signature"></span>difference<span class="type-signature"></span></h4>




<div class="description">
    Finds the difference between two polygons by clipping the second
polygon from the first.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1628">line 1628</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly1 = {
  "type": "Feature",
  "properties": {
    "fill": "#0f0"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-46.738586, -23.596711],
      [-46.738586, -23.458207],
      [-46.560058, -23.458207],
      [-46.560058, -23.596711],
      [-46.738586, -23.596711]
    ]]
  }
};
var poly2 = {
  "type": "Feature",
  "properties": {
    "fill": "#00f"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-46.650009, -23.631314],
      [-46.650009, -23.5237],
      [-46.509246, -23.5237],
      [-46.509246, -23.631314],
      [-46.650009, -23.631314]
    ]]
  }
};

var differenced = turf.difference(poly1, poly2);
differenced.properties.fill = '#f00';

var polygons = {
  "type": "FeatureCollection",
  "features": [poly1, poly2]
};

//=polygons

//=differenced</code></pre>



        
            
<h4 class="name" id="distanceToDegrees"><span class="type-signature"></span>distanceToDegrees<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement from a real-world unit into degrees
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line895">line 895</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="distanceToDegrees"><span class="type-signature"></span>distanceToDegrees<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement from a real-world unit into degrees
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9312">line 9312</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="distanceToRadians"><span class="type-signature"></span>distanceToRadians<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement from a real-world unit into radians
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line880">line 880</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="distanceToRadians"><span class="type-signature"></span>distanceToRadians<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement from a real-world unit into radians
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9297">line 9297</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="explode"><span class="type-signature"></span>explode<span class="type-signature"></span></h4>




<div class="description">
    Takes a feature or set of features and returns all positions as
points.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1726">line 1726</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [177.434692, -17.77517],
      [177.402076, -17.779093],
      [177.38079, -17.803937],
      [177.40242, -17.826164],
      [177.438468, -17.824857],
      [177.454948, -17.796746],
      [177.434692, -17.77517]
    ]]
  }
};

var points = turf.explode(poly);

//=poly

//=points</code></pre>



        
            
<h4 class="name" id="feature"><span class="type-signature"></span>feature<span class="type-signature"></span></h4>




<div class="description">
    Wraps a GeoJSON Geometry in a GeoJSON Feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line589">line 589</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var geometry = {
     "type": "Point",
     "coordinates": [
       67.5,
       32.84267363195431
     ]
   }

var feature = turf.feature(geometry);

//=feature</code></pre>



        
            
<h4 class="name" id="feature"><span class="type-signature"></span>feature<span class="type-signature"></span></h4>




<div class="description">
    Wraps a GeoJSON Geometry in a GeoJSON Feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1845">line 1845</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var geometry = {
  "type": "Point",
  "coordinates": [110, 50]
};

var feature = turf.feature(geometry);

//=feature</code></pre>



        
            
<h4 class="name" id="feature"><span class="type-signature"></span>feature<span class="type-signature"></span></h4>




<div class="description">
    Wraps a GeoJSON Geometry in a GeoJSON Feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9006">line 9006</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var geometry = {     "type": "Point",     "coordinates": [       67.5,       32.84267363195431     ]   }var feature = turf.feature(geometry);//=feature</code></pre>



        
            
<h4 class="name" id="feature"><span class="type-signature"></span>feature<span class="type-signature"></span></h4>




<div class="description">
    Wraps a GeoJSON Geometry in a GeoJSON Feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9527">line 9527</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var geometry = {     "type": "Point",     "coordinates": [       67.5,       32.84267363195431     ]   }var feature = turf.feature(geometry);//=feature</code></pre>



        
            
<h4 class="name" id="featureCollection"><span class="type-signature"></span>featureCollection<span class="type-signature"></span></h4>




<div class="description">
    Takes one or more Features and creates a FeatureCollection.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9661">line 9661</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = [ turf.point([-75.343, 39.984], {name: 'Location A'}), turf.point([-75.833, 39.284], {name: 'Location B'}), turf.point([-75.534, 39.123], {name: 'Location C'})];var fc = turf.featureCollection(features);//=fc</code></pre>



        
            
<h4 class="name" id="featureCollection"><span class="type-signature"></span>featureCollection<span class="type-signature"></span></h4>




<div class="description">
    Takes one or more Features and creates a FeatureCollection.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line722">line 722</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = [
 turf.point([-75.343, 39.984], {name: 'Location A'}),
 turf.point([-75.833, 39.284], {name: 'Location B'}),
 turf.point([-75.534, 39.123], {name: 'Location C'})
];

var fc = turf.featureCollection(features);

//=fc</code></pre>



        
            
<h4 class="name" id="featureCollection"><span class="type-signature"></span>featureCollection<span class="type-signature"></span></h4>




<div class="description">
    Takes one or more Features and creates a FeatureCollection.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9139">line 9139</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = [ turf.point([-75.343, 39.984], {name: 'Location A'}), turf.point([-75.833, 39.284], {name: 'Location B'}), turf.point([-75.534, 39.123], {name: 'Location C'})];var fc = turf.featureCollection(features);//=fc</code></pre>



        
            
<h4 class="name" id="featureCollection"><span class="type-signature"></span>featureCollection<span class="type-signature"></span></h4>




<div class="description">
    Takes one or more Features and creates a FeatureCollection.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2108">line 2108</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});

var collection = turf.featureCollection([
  locationA,
  locationB,
  locationC
]);

//=collection</code></pre>



        
            
<h4 class="name" id="featureEach"><span class="type-signature"></span>featureEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over features in any GeoJSON object, similar to
Array.forEach.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4612">line 4612</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
  turf.point([26, 37], {foo: 'bar'}),
  turf.point([36, 53], {hello: 'world'})
]);

turf.featureEach(features, function (currentFeature, featureIndex) {
  //=currentFeature
  //=featureIndex
});</code></pre>



        
            
<h4 class="name" id="featureEach"><span class="type-signature"></span>featureEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over features in any GeoJSON object, similar toArray.forEach.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10294">line 10294</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.featureEach(features, function (currentFeature, currentIndex) {  //=currentFeature  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="featureEach"><span class="type-signature"></span>featureEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over features in any GeoJSON object, similar to
Array.forEach.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3289">line 3289</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.featureEach(features, function (currentFeature, currentIndex) {
  //=currentFeature
  //=currentIndex
});</code></pre>



        
            
<h4 class="name" id="featureEach"><span class="type-signature"></span>featureEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over features in any GeoJSON object, similar toArray.forEach.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11202">line 11202</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.featureEach(features, function (currentFeature, currentIndex) {  //=currentFeature  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="featureOf"><span class="type-signature"></span>featureOf<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of Feature inputs for Turf.
Internally this uses <a href="global.html#geojsonType">geojsonType</a> to judge geometry types.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2728">line 2728</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="featureOf"><span class="type-signature"></span>featureOf<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of Feature inputs for Turf.
Internally this uses <a href="global.html#geojsonType">geojsonType</a> to judge geometry types.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1016">line 1016</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="featureOf"><span class="type-signature"></span>featureOf<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of Feature inputs for Turf.Internally this uses <a href="global.html#geojsonType">geojsonType</a> to judge geometry types.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9433">line 9433</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="featureReduce"><span class="type-signature"></span>featureReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce features in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11270">line 11270</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.featureReduce(features, function (previousValue, currentFeature, currentIndex) {  //=previousValue  //=currentFeature  //=currentIndex  return currentFeature});</code></pre>



        
            
<h4 class="name" id="featureReduce"><span class="type-signature"></span>featureReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce features in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4662">line 4662</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
  turf.point([26, 37], {"foo": "bar"}),
  turf.point([36, 53], {"hello": "world"})
]);

turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  //=previousValue
  //=currentFeature
  //=featureIndex
  return currentFeature
});</code></pre>



        
            
<h4 class="name" id="featureReduce"><span class="type-signature"></span>featureReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce features in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10361">line 10361</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.featureReduce(features, function (previousValue, currentFeature, currentIndex) {  //=previousValue  //=currentFeature  //=currentIndex  return currentFeature});</code></pre>



        
            
<h4 class="name" id="featureReduce"><span class="type-signature"></span>featureReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce features in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3356">line 3356</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {"foo": "bar"},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {"hello": "world"},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.featureReduce(features, function (previousValue, currentFeature, currentIndex) {
  //=previousValue
  //=currentFeature
  //=currentIndex
  return currentFeature
});</code></pre>



        
            
<h4 class="name" id="flatten"><span class="type-signature"></span>flatten<span class="type-signature"></span></h4>




<div class="description">
    Flattens any GeoJSON to a FeatureCollection inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten).
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3949">line 3949</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var geometry = {
  "type": "MultiPolygon",
  "coordinates": [
    [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],
     [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],
     [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]
   ]
 };

var flattened = turf.flatten(geometry);

//=flattened</code></pre>



        
            
<h4 class="name" id="flatten"><span class="type-signature"></span>flatten<span class="type-signature"></span></h4>




<div class="description">
    Flattens any GeoJSON to a FeatureCollection inspired by [geojson-flatten](https://github.com/tmcw/geojson-flatten).
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10719">line 10719</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var geometry = {  "type": "MultiPolygon",  "coordinates": [    [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],     [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],     [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]   ] };var flattened = turf.flatten(geometry);//=flattened</code></pre>



        
            
<h4 class="name" id="flattenEach"><span class="type-signature"></span>flattenEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over flattened features in any GeoJSON object, similar to
Array.forEach.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4884">line 4884</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
]);

turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  //=currentFeature
  //=featureIndex
  //=multiFeatureIndex
});</code></pre>



        
            
<h4 class="name" id="flattenReduce"><span class="type-signature"></span>flattenReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce flattened features in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4964">line 4964</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
]);

turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  //=previousValue
  //=currentFeature
  //=featureIndex
  //=multiFeatureIndex
  return currentFeature
});</code></pre>



        
            
<h4 class="name" id="geojsonType"><span class="type-signature"></span>geojsonType<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of GeoJSON objects for Turf.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2711">line 2711</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="geojsonType"><span class="type-signature"></span>geojsonType<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of GeoJSON objects for Turf.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9416">line 9416</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="geojsonType"><span class="type-signature"></span>geojsonType<span class="type-signature"></span></h4>




<div class="description">
    Enforce expectations about types of GeoJSON objects for Turf.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line999">line 999</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="geomEach"><span class="type-signature"></span>geomEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4726">line 4726</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.point([36, 53], {hello: 'world'})
]);

turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  //=currentGeometry
  //=featureIndex
  //=featureProperties
  //=featureBBox
  //=featureId
});</code></pre>



        
            
<h4 class="name" id="geomEach"><span class="type-signature"></span>geomEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3444">line 3444</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.geomEach(features, function (currentGeometry, currentIndex) {
  //=currentGeometry
  //=currentIndex
});</code></pre>



        
            
<h4 class="name" id="geomEach"><span class="type-signature"></span>geomEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10449">line 10449</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.geomEach(features, function (currentGeometry, currentIndex) {  //=currentGeometry  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="geomEach"><span class="type-signature"></span>geomEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11360">line 11360</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.geomEach(features, function (currentGeometry, currentIndex) {  //=currentGeometry  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="geometry"><span class="type-signature"></span>geometry<span class="type-signature"></span></h4>




<div class="description">
    Creates a GeoJSON Geometry from a Geometry string type & coordinates.
For GeometryCollection type use `helpers.geometryCollection`
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1887">line 1887</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var type = 'Point';
var coordinates = [110, 50];

var geometry = turf.geometry(type, coordinates);

//=geometry</code></pre>



        
            
<h4 class="name" id="geometryCollection"><span class="type-signature"></span>geometryCollection<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;GeometryCollection> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9760">line 9760</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = {    "type": "Point",      "coordinates": [100, 0]    };var line = {    "type": "LineString",    "coordinates": [ [101, 0], [102, 1] ]  };var collection = turf.geometryCollection([pt, line]);//=collection</code></pre>



        
            
<h4 class="name" id="geometryCollection"><span class="type-signature"></span>geometryCollection<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;GeometryCollection> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2230">line 2230</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = {
    "type": "Point",
      "coordinates": [100, 0]
    };
var line = {
    "type": "LineString",
    "coordinates": [ [101, 0], [102, 1] ]
  };
var collection = turf.geometryCollection([pt, line]);

//=collection</code></pre>



        
            
<h4 class="name" id="geometryCollection"><span class="type-signature"></span>geometryCollection<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;GeometryCollection> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9238">line 9238</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = {    "type": "Point",      "coordinates": [100, 0]    };var line = {    "type": "LineString",    "coordinates": [ [101, 0], [102, 1] ]  };var collection = turf.geometryCollection([pt, line]);//=collection</code></pre>



        
            
<h4 class="name" id="geometryCollection"><span class="type-signature"></span>geometryCollection<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;GeometryCollection> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line821">line 821</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = {
    "type": "Point",
      "coordinates": [100, 0]
    };
var line = {
    "type": "LineString",
    "coordinates": [ [101, 0], [102, 1] ]
  };
var collection = turf.geometryCollection([pt, line]);

//=collection</code></pre>



        
            
<h4 class="name" id="geomReduce"><span class="type-signature"></span>geomReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce geometry in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10557">line 10557</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.geomReduce(features, function (previousValue, currentGeometry, currentIndex) {  //=previousValue  //=currentGeometry  //=currentIndex  return currentGeometry});</code></pre>



        
            
<h4 class="name" id="geomReduce"><span class="type-signature"></span>geomReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce geometry in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11469">line 11469</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.geomReduce(features, function (previousValue, currentGeometry, currentIndex) {  //=previousValue  //=currentGeometry  //=currentIndex  return currentGeometry});</code></pre>



        
            
<h4 class="name" id="geomReduce"><span class="type-signature"></span>geomReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce geometry in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4842">line 4842</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.point([36, 53], {hello: 'world'})
]);

turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  //=previousValue
  //=currentGeometry
  //=featureIndex
  //=featureProperties
  //=featureBBox
  //=featureId
  return currentGeometry
});</code></pre>



        
            
<h4 class="name" id="geomReduce"><span class="type-signature"></span>geomReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce geometry in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3552">line 3552</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {"foo": "bar"},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {"hello": "world"},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.geomReduce(features, function (previousValue, currentGeometry, currentIndex) {
  //=previousValue
  //=currentGeometry
  //=currentIndex
  return currentGeometry
});</code></pre>



        
            
<h4 class="name" id="getCoord"><span class="type-signature"></span>getCoord<span class="type-signature"></span></h4>




<div class="description">
    Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9343">line 9343</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="getCoord"><span class="type-signature"></span>getCoord<span class="type-signature"></span></h4>




<div class="description">
    Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line926">line 926</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="getCoord"><span class="type-signature"></span>getCoord<span class="type-signature"></span></h4>




<div class="description">
    Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2645">line 2645</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = turf.point([10, 10]);

var coord = turf.getCoord(pt);
//= [10, 10]</code></pre>



        
            
<h4 class="name" id="getCoords"><span class="type-signature"></span>getCoords<span class="type-signature"></span></h4>




<div class="description">
    Unwrap coordinates from a Feature, Geometry Object or an Array of numbers
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9365">line 9365</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="getCoords"><span class="type-signature"></span>getCoords<span class="type-signature"></span></h4>




<div class="description">
    Unwrap coordinates from a Feature, Geometry Object or an Array
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2666">line 2666</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);

var coords = turf.getCoords(poly);
//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]</code></pre>



        
            
<h4 class="name" id="getCoords"><span class="type-signature"></span>getCoords<span class="type-signature"></span></h4>




<div class="description">
    Unwrap coordinates from a Feature, Geometry Object or an Array of numbers
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line948">line 948</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="inside"><span class="type-signature"></span>inside<span class="type-signature"></span></h4>




<div class="description">
    Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can
be convex or concave. The function accounts for holes.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2574">line 2574</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt = turf.point([-77, 44]);
var poly = turf.polygon([[
  [-81, 41],
  [-81, 47],
  [-72, 47],
  [-72, 41],
  [-81, 41]
]]);

var isInside = turf.inside(pt, poly);

//=isInside</code></pre>



        
            
<h4 class="name" id="lengthToDegrees"><span class="type-signature"></span>lengthToDegrees<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2320">line 2320</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="lengthToRadians"><span class="type-signature"></span>lengthToRadians<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2302">line 2302</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="lineEach"><span class="type-signature"></span>lineEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
similar to Array.forEach.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5132">line 5132</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiLine = turf.multiLineString([
  [[26, 37], [35, 45]],
  [[36, 53], [38, 50], [41, 55]]
]);

turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  //=currentLine
  //=featureIndex
  //=multiFeatureIndex
  //=geometryIndex
});</code></pre>



        
            
<h4 class="name" id="lineIntersect"><span class="type-signature"></span>lineIntersect<span class="type-signature"></span></h4>




<div class="description">
    Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2857">line 2857</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var line1 = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "LineString",
    "coordinates": [[126, -11], [129, -21]]
  }
};
var line2 = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "LineString",
    "coordinates": [[123, -18], [131, -14]]
  }
};
var points = turf.lineIntersect(line1, line2);
//= points</code></pre>



        
            
<h4 class="name" id="lineIntersect"><span class="type-signature"></span>lineIntersect<span class="type-signature"></span></h4>




<div class="description">
    Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9862">line 9862</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var line1 = {  "type": "Feature",  "properties": {},  "geometry": {    "type": "LineString",    "coordinates": [[126, -11], [129, -21]]  }};var line2 = {  "type": "Feature",  "properties": {},  "geometry": {    "type": "LineString",    "coordinates": [[123, -18], [131, -14]]  }};var points = turf.lineIntersect(line1, line2);//= points</code></pre>



        
            
<h4 class="name" id="lineOffset"><span class="type-signature"></span>lineOffset<span class="type-signature"></span></h4>




<div class="description">
    Takes a line and returns a line at offset by the specified distance.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3736">line 3736</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { "stroke": "#F00" });

var offsetLine = turf.lineOffset(line, 2, {units: 'miles'});

//addToMap
var addToMap = [offsetLine, line]
offsetLine.properties.stroke = "#00F"</code></pre>



        
            
<h4 class="name" id="lineReduce"><span class="type-signature"></span>lineReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce features in any GeoJSON object, similar to Array.reduce().
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5196">line 5196</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPoly = turf.multiPolygon([
  turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
]);

turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  //=previousValue
  //=currentLine
  //=featureIndex
  //=multiFeatureIndex
  //=geometryIndex
  return currentLine
});</code></pre>



        
            
<h4 class="name" id="lineSegment"><span class="type-signature"></span>lineSegment<span class="type-signature"></span></h4>




<div class="description">
    Creates a FeatureCollection of 2-vertex LineString segments from a LineString, MultiLineString, MultiPolygon or Polygon.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3855">line 3855</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]
  }
}
var segments = turf.lineSegment(polygon);
//=segments</code></pre>



        
            
<h4 class="name" id="lineSegment"><span class="type-signature"></span>lineSegment<span class="type-signature"></span></h4>




<div class="description">
    Creates a FeatureCollection of 2-vertex LineString segments from a LineString, MultiLineString, MultiPolygon or Polygon.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10625">line 10625</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = {  "type": "Feature",  "properties": {},  "geometry": {    "type": "Polygon",    "coordinates": [[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]  }}var segments = turf.lineSegment(polygon);//=segments</code></pre>



        
            
<h4 class="name" id="lineString"><span class="type-signature"></span>lineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a LineString Feature from an Array of Positions.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2052">line 2052</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});

//=linestring1
//=linestring2</code></pre>



        
            
<h4 class="name" id="lineString"><span class="type-signature"></span>lineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a LineString based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9103">line 9103</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var linestring1 = turf.lineString([  [-21.964416, 64.148203],  [-21.956176, 64.141316],  [-21.93901, 64.135924],  [-21.927337, 64.136673]]);var linestring2 = turf.lineString([  [-21.929054, 64.127985],  [-21.912918, 64.134726],  [-21.916007, 64.141016],  [-21.930084, 64.14446]], {name: 'line 1', distance: 145});//=linestring1//=linestring2</code></pre>



        
            
<h4 class="name" id="lineString"><span class="type-signature"></span>lineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a LineString based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9625">line 9625</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var linestring1 = turf.lineString([  [-21.964416, 64.148203],  [-21.956176, 64.141316],  [-21.93901, 64.135924],  [-21.927337, 64.136673]]);var linestring2 = turf.lineString([  [-21.929054, 64.127985],  [-21.912918, 64.134726],  [-21.916007, 64.141016],  [-21.930084, 64.14446]], {name: 'line 1', distance: 145});//=linestring1//=linestring2</code></pre>



        
            
<h4 class="name" id="lineString"><span class="type-signature"></span>lineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a LineString based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line686">line 686</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var linestring1 = turf.lineString([
  [-21.964416, 64.148203],
  [-21.956176, 64.141316],
  [-21.93901, 64.135924],
  [-21.927337, 64.136673]
]);
var linestring2 = turf.lineString([
  [-21.929054, 64.127985],
  [-21.912918, 64.134726],
  [-21.916007, 64.141016],
  [-21.930084, 64.14446]
], {name: 'line 1', distance: 145});

//=linestring1

//=linestring2</code></pre>



        
            
<h4 class="name" id="lineStrings"><span class="type-signature"></span>lineStrings<span class="type-signature"></span></h4>




<div class="description">
    Creates a LineString FeatureCollection from an Array of LineString coordinates.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2081">line 2081</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var linestrings = turf.lineStrings([
  [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
]);

//=linestrings</code></pre>



        
            
<h4 class="name" id="mask"><span class="type-signature"></span>mask<span class="type-signature"></span></h4>




<div class="description">
    Takes any type of polygon and an optional mask and returns a polygon exterior ring with holes.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4104">line 4104</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]
  }
}
var mask = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]
  }
}
var masked = turf.mask(polygon, mask);
//=masked</code></pre>



        
            
<h4 class="name" id="multiLineString"><span class="type-signature"></span>multiLineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiLineString> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line748">line 748</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiLine = turf.multiLineString([[[0,0],[10,10]]]);

//=multiLine</code></pre>



        
            
<h4 class="name" id="multiLineString"><span class="type-signature"></span>multiLineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiLineString> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2151">line 2151</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiLine = turf.multiLineString([[[0,0],[10,10]]]);

//=multiLine</code></pre>



        
            
<h4 class="name" id="multiLineString"><span class="type-signature"></span>multiLineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiLineString> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9687">line 9687</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiLine = turf.multiLineString([[[0,0],[10,10]]]);//=multiLine</code></pre>



        
            
<h4 class="name" id="multiLineString"><span class="type-signature"></span>multiLineString<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiLineString> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9165">line 9165</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiLine = turf.multiLineString([[[0,0],[10,10]]]);//=multiLine</code></pre>



        
            
<h4 class="name" id="multiPoint"><span class="type-signature"></span>multiPoint<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPoint> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9711">line 9711</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPt = turf.multiPoint([[0,0],[10,10]]);//=multiPt</code></pre>



        
            
<h4 class="name" id="multiPoint"><span class="type-signature"></span>multiPoint<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPoint> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line772">line 772</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPt = turf.multiPoint([[0,0],[10,10]]);

//=multiPt</code></pre>



        
            
<h4 class="name" id="multiPoint"><span class="type-signature"></span>multiPoint<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPoint> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9189">line 9189</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPt = turf.multiPoint([[0,0],[10,10]]);//=multiPt</code></pre>



        
            
<h4 class="name" id="multiPoint"><span class="type-signature"></span>multiPoint<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPoint> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2177">line 2177</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPt = turf.multiPoint([[0,0],[10,10]]);

//=multiPt</code></pre>



        
            
<h4 class="name" id="multiPolygon"><span class="type-signature"></span>multiPolygon<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPolygon> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9214">line 9214</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);//=multiPoly</code></pre>



        
            
<h4 class="name" id="multiPolygon"><span class="type-signature"></span>multiPolygon<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPolygon> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2203">line 2203</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);

//=multiPoly</code></pre>



        
            
<h4 class="name" id="multiPolygon"><span class="type-signature"></span>multiPolygon<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPolygon> based on acoordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9736">line 9736</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);//=multiPoly</code></pre>



        
            
<h4 class="name" id="multiPolygon"><span class="type-signature"></span>multiPolygon<span class="type-signature"></span></h4>




<div class="description">
    Creates a Feature.&lt;MultiPolygon> based on a
coordinate array. Properties can be added optionally.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line797">line 797</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);

//=multiPoly</code></pre>



        
            
<h4 class="name" id="point"><span class="type-signature"></span>point<span class="type-signature"></span></h4>




<div class="description">
    Takes coordinates and properties (optional) and returns a new Point feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9036">line 9036</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt1 = turf.point([-75.343, 39.984]);//=pt1</code></pre>



        
            
<h4 class="name" id="point"><span class="type-signature"></span>point<span class="type-signature"></span></h4>




<div class="description">
    Takes coordinates and properties (optional) and returns a new Point feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9558">line 9558</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt1 = turf.point([-75.343, 39.984]);//=pt1</code></pre>



        
            
<h4 class="name" id="point"><span class="type-signature"></span>point<span class="type-signature"></span></h4>




<div class="description">
    Takes coordinates and properties (optional) and returns a new Point feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line619">line 619</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var pt1 = turf.point([-75.343, 39.984]);

//=pt1</code></pre>



        
            
<h4 class="name" id="point"><span class="type-signature"></span>point<span class="type-signature"></span></h4>




<div class="description">
    Creates a Point Feature from a Position.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1932">line 1932</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var point = turf.point([-75.343, 39.984]);

//=point</code></pre>



        
            
<h4 class="name" id="points"><span class="type-signature"></span>points<span class="type-signature"></span></h4>




<div class="description">
    Creates a Point FeatureCollection from an Array of Point coordinates.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1959">line 1959</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var points = turf.points([
  [-75, 39],
  [-80, 45],
  [-78, 50]
]);

//=points</code></pre>



        
            
<h4 class="name" id="polygon"><span class="type-signature"></span>polygon<span class="type-signature"></span></h4>




<div class="description">
    Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9061">line 9061</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = turf.polygon([[ [-2.275543, 53.464547], [-2.275543, 53.489271], [-2.215118, 53.489271], [-2.215118, 53.464547], [-2.275543, 53.464547]]], { name: 'poly1', population: 400});//=polygon</code></pre>



        
            
<h4 class="name" id="polygon"><span class="type-signature"></span>polygon<span class="type-signature"></span></h4>




<div class="description">
    Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line644">line 644</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = turf.polygon([[
 [-2.275543, 53.464547],
 [-2.275543, 53.489271],
 [-2.215118, 53.489271],
 [-2.215118, 53.464547],
 [-2.275543, 53.464547]
]], { name: 'poly1', population: 400});

//=polygon</code></pre>



        
            
<h4 class="name" id="polygon"><span class="type-signature"></span>polygon<span class="type-signature"></span></h4>




<div class="description">
    Creates a Polygon Feature from an Array of LinearRings.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line1987">line 1987</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });

//=polygon</code></pre>



        
            
<h4 class="name" id="polygon"><span class="type-signature"></span>polygon<span class="type-signature"></span></h4>




<div class="description">
    Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9583">line 9583</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygon = turf.polygon([[ [-2.275543, 53.464547], [-2.275543, 53.489271], [-2.215118, 53.489271], [-2.215118, 53.464547], [-2.275543, 53.464547]]], { name: 'poly1', population: 400});//=polygon</code></pre>



        
            
<h4 class="name" id="polygons"><span class="type-signature"></span>polygons<span class="type-signature"></span></h4>




<div class="description">
    Creates a Polygon FeatureCollection from an Array of Polygon coordinates.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2025">line 2025</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var polygons = turf.polygons([
  [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
]);

//=polygons</code></pre>



        
            
<h4 class="name" id="polygonToLineString"><span class="type-signature"></span>polygonToLineString<span class="type-signature"></span></h4>




<div class="description">
    Converts a Polygon or MultiPolygon to a FeatureCollection of LineString or MultiLineString.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5448">line 5448</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly = {
  'type': 'Feature',
  'properties': {},
  'geometry': {
    'type': 'Polygon',
    'coordinates': [[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]
  }
}
var lines = turf.polygonToLineString(poly);
//addToMap
var addToMap = [lines]</code></pre>



        
            
<h4 class="name" id="polygonToLineString"><span class="type-signature"></span>polygonToLineString<span class="type-signature"></span></h4>




<div class="description">
    Converts a Polygon or MultiPolygon to a FeatureCollection of LineString or MultiLineString.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11526">line 11526</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly = {  'type': 'Feature',  'properties': {},  'geometry': {    'type': 'Polygon',    'coordinates': [[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]  }}var lines = turf.polygonToLineString(poly);//addToMapvar addToMap = [lines]</code></pre>



        
            
<h4 class="name" id="propEach"><span class="type-signature"></span>propEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over properties in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3157">line 3157</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {"foo": "bar"},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {"hello": "world"},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.propEach(features, function (currentProperties, currentIndex) {
  //=currentProperties
  //=currentIndex
});</code></pre>



        
            
<h4 class="name" id="propEach"><span class="type-signature"></span>propEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over properties in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4518">line 4518</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.point([36, 53], {hello: 'world'})
]);

turf.propEach(features, function (currentProperties, featureIndex) {
  //=currentProperties
  //=featureIndex
});</code></pre>



        
            
<h4 class="name" id="propEach"><span class="type-signature"></span>propEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over properties in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11068">line 11068</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.propEach(features, function (currentProperties, currentIndex) {  //=currentProperties  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="propEach"><span class="type-signature"></span>propEach<span class="type-signature"></span></h4>




<div class="description">
    Iterate over properties in any GeoJSON object, similar to Array.forEach()
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10162">line 10162</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.propEach(features, function (currentProperties, currentIndex) {  //=currentProperties  //=currentIndex});</code></pre>



        
            
<h4 class="name" id="propReduce"><span class="type-signature"></span>propReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce properties in any GeoJSON object into a single value,
similar to how Array.reduce works. However, in this case we lazily run
the reduction, so an array of all properties is unnecessary.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line3228">line 3228</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {"foo": "bar"},
      "geometry": {
        "type": "Point",
        "coordinates": [26, 37]
      }
    },
    {
      "type": "Feature",
      "properties": {"hello": "world"},
      "geometry": {
        "type": "Point",
        "coordinates": [36, 53]
      }
    }
  ]
};
turf.propReduce(features, function (previousValue, currentProperties, currentIndex) {
  //=previousValue
  //=currentProperties
  //=currentIndex
  return currentProperties
});</code></pre>



        
            
<h4 class="name" id="propReduce"><span class="type-signature"></span>propReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce properties in any GeoJSON object into a single value,similar to how Array.reduce works. However, in this case we lazily runthe reduction, so an array of all properties is unnecessary.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11140">line 11140</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.propReduce(features, function (previousValue, currentProperties, currentIndex) {  //=previousValue  //=currentProperties  //=currentIndex  return currentProperties});</code></pre>



        
            
<h4 class="name" id="propReduce"><span class="type-signature"></span>propReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce properties in any GeoJSON object into a single value,similar to how Array.reduce works. However, in this case we lazily runthe reduction, so an array of all properties is unnecessary.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line10233">line 10233</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = {  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {"foo": "bar"},      "geometry": {        "type": "Point",        "coordinates": [26, 37]      }    },    {      "type": "Feature",      "properties": {"hello": "world"},      "geometry": {        "type": "Point",        "coordinates": [36, 53]      }    }  ]};turf.propReduce(features, function (previousValue, currentProperties, currentIndex) {  //=previousValue  //=currentProperties  //=currentIndex  return currentProperties});</code></pre>



        
            
<h4 class="name" id="propReduce"><span class="type-signature"></span>propReduce<span class="type-signature"></span></h4>




<div class="description">
    Reduce properties in any GeoJSON object into a single value,
similar to how Array.reduce works. However, in this case we lazily run
the reduction, so an array of all properties is unnecessary.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4572">line 4572</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.point([36, 53], {hello: 'world'})
]);

turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  //=previousValue
  //=currentProperties
  //=featureIndex
  return currentProperties
});</code></pre>



        
            
<h4 class="name" id="radiansToDegrees"><span class="type-signature"></span>radiansToDegrees<span class="type-signature"></span></h4>




<div class="description">
    Converts an angle in radians to degrees
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2349">line 2349</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="radiansToDistance"><span class="type-signature"></span>radiansToDistance<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement from radians to a more friendly unit.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line865">line 865</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="radiansToDistance"><span class="type-signature"></span>radiansToDistance<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement from radians to a more friendly unit.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line9282">line 9282</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="radiansToLength"><span class="type-signature"></span>radiansToLength<span class="type-signature"></span></h4>




<div class="description">
    Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line2284">line 2284</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="rbush"><span class="type-signature"></span>rbush<span class="type-signature"></span></h4>




<div class="description">
    GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line6248">line 6248</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var rbush = require('geojson-rbush')
var tree = rbush()</code></pre>



        
            
<h4 class="name" id="rbush"><span class="type-signature"></span>rbush<span class="type-signature"></span></h4>




<div class="description">
    GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line11584">line 11584</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var rbush = require('geojson-rbush')var tree = rbush()</code></pre>



        
            
<h4 class="name" id="simplify"><span class="type-signature"></span>simplify<span class="type-signature"></span></h4>




<div class="description">
    Takes a LineString or Polygon and returns a simplified version. Internally uses [simplify-js](http://mourner.github.io/simplify-js/) to perform simplification.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5506">line 5506</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var feature = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-70.603637, -33.399918],
      [-70.614624, -33.395332],
      [-70.639343, -33.392466],
      [-70.659942, -33.394759],
      [-70.683975, -33.404504],
      [-70.697021, -33.419406],
      [-70.701141, -33.434306],
      [-70.700454, -33.446339],
      [-70.694274, -33.458369],
      [-70.682601, -33.465816],
      [-70.668869, -33.472117],
      [-70.646209, -33.473835],
      [-70.624923, -33.472117],
      [-70.609817, -33.468107],
      [-70.595397, -33.458369],
      [-70.587158, -33.442901],
      [-70.587158, -33.426283],
      [-70.590591, -33.414248],
      [-70.594711, -33.406224],
      [-70.603637, -33.399918]
    ]]
  }
};
var tolerance = 0.01;

var simplified = turf.simplify(
 feature, tolerance, false);

//=feature

//=simplified</code></pre>



        
            
<h4 class="name" id="union"><span class="type-signature"></span>union<span class="type-signature"></span></h4>




<div class="description">
    Takes two or more polygons and returns a combined polygon. If the input polygons are not contiguous, this function returns a MultiPolygon feature.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5686">line 5686</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var poly1 = {
  "type": "Feature",
  "properties": {
    "fill": "#0f0"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-82.574787, 35.594087],
      [-82.574787, 35.615581],
      [-82.545261, 35.615581],
      [-82.545261, 35.594087],
      [-82.574787, 35.594087]
    ]]
  }
};
var poly2 = {
  "type": "Feature",
  "properties": {
    "fill": "#00f"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-82.560024, 35.585153],
      [-82.560024, 35.602602],
      [-82.52964, 35.602602],
      [-82.52964, 35.585153],
      [-82.560024, 35.585153]
    ]]
  }
};
var polygons = {
  "type": "FeatureCollection",
  "features": [poly1, poly2]
};

var union = turf.union(poly1, poly2);

//=polygons

//=union</code></pre>



        
            
<h4 class="name" id="within"><span class="type-signature"></span>within<span class="type-signature"></span></h4>




<div class="description">
    Takes a set of points and a set of polygons and returns the points that fall within the polygons.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5758">line 5758</a>
    </li></ul></dd>
    

    

    

    
</dl>





    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var searchWithin = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [[
          [-46.653,-23.543],
          [-46.634,-23.5346],
          [-46.613,-23.543],
          [-46.614,-23.559],
          [-46.631,-23.567],
          [-46.653,-23.560],
          [-46.653,-23.543]
        ]]
      }
    }
  ]
};
var points = {
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-46.6318, -23.5523]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-46.6246, -23.5325]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-46.6062, -23.5513]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-46.663, -23.554]
      }
    }, {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Point",
        "coordinates": [-46.643, -23.557]
      }
    }
  ]
};

var ptsWithin = turf.within(points, searchWithin);

//=points

//=searchWithin

//=ptsWithin</code></pre>



        
    

    

    
        <h3 class="subsection-title">Type Definitions</h3>

        
                

    

    <h4 class="name" id="coordEachCallback"><span class="type-signature"></span>coordEachCallback<span class="signature">(currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for coordEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentCoord</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


            
            </td>

            

            

            <td class="description last">The current coordinate being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coordIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the coordinate being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometryIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Geometry being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4321">line 4321</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="coordReduceCallback"><span class="type-signature"></span>coordReduceCallback<span class="signature">(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for coordReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentCoord</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


            
            </td>

            

            

            <td class="description last">The current coordinate being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>coordIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the coordinate being processed.
Starts at index 0, if an initialValue is provided, and at index 1 otherwise.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometryIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Geometry being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4451">line 4451</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="featureEachCallback"><span class="type-signature"></span>featureEachCallback<span class="signature">(currentFeature, featureIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for featureEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentFeature</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature.&lt;any></span>


            
            </td>

            

            

            <td class="description last">The current Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4604">line 4604</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="featureReduceCallback"><span class="type-signature"></span>featureReduceCallback<span class="signature">(previousValue, currentFeature, featureIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for featureReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentFeature</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature</span>


            
            </td>

            

            

            <td class="description last">The current Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4641">line 4641</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="flattenEachCallback"><span class="type-signature"></span>flattenEachCallback<span class="signature">(currentFeature, featureIndex, multiFeatureIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for flattenEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentFeature</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature</span>


            
            </td>

            

            

            <td class="description last">The current flattened feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4875">line 4875</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="flattenReduceCallback"><span class="type-signature"></span>flattenReduceCallback<span class="signature">(previousValue, currentFeature, featureIndex, multiFeatureIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for flattenReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentFeature</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature</span>


            
            </td>

            

            

            <td class="description last">The current Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4942">line 4942</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="geomEachCallback"><span class="type-signature"></span>geomEachCallback<span class="signature">(currentGeometry, featureIndex, featureProperties, featureBBox, featureId)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for geomEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentGeometry</code></td>
            

            <td class="type">
            
                
<span class="param-type">Geometry</span>


            
            </td>

            

            

            <td class="description last">The current Geometry being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureProperties</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The current Feature Properties being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureBBox</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


            
            </td>

            

            

            <td class="description last">The current Feature BBox being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureId</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">The current Feature Id being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4715">line 4715</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="geomReduceCallback"><span class="type-signature"></span>geomReduceCallback<span class="signature">(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for geomReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentGeometry</code></td>
            

            <td class="type">
            
                
<span class="param-type">Geometry</span>


            
            </td>

            

            

            <td class="description last">The current Geometry being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureProperties</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The current Feature Properties being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureBBox</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


            
            </td>

            

            

            <td class="description last">The current Feature BBox being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureId</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>
|

<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">The current Feature Id being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4818">line 4818</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="lineEachCallback"><span class="type-signature"></span>lineEachCallback<span class="signature">(currentLine, featureIndex, multiFeatureIndex, geometryIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for lineEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentLine</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature.&lt;LineString></span>


            
            </td>

            

            

            <td class="description last">The current LineString|LinearRing being processed</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometryIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Geometry being processed</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5122">line 5122</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="lineReduceCallback"><span class="type-signature"></span>lineReduceCallback<span class="signature">(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for lineReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentLine</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature.&lt;LineString></span>


            
            </td>

            

            

            <td class="description last">The current LineString|LinearRing being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometryIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Geometry being processed</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5173">line 5173</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="propEachCallback"><span class="type-signature"></span>propEachCallback<span class="signature">(currentProperties, featureIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for propEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentProperties</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The current Properties being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4510">line 4510</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="propReduceCallback"><span class="type-signature"></span>propReduceCallback<span class="signature">(previousValue, currentProperties, featureIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for propReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentProperties</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The current Properties being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4551">line 4551</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="segmentEachCallback"><span class="type-signature"></span>segmentEachCallback<span class="signature">(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)</span><span class="type-signature"> &rarr; {void}</span></h4>

    



<div class="description">
    Callback for segmentEach
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>currentSegment</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature.&lt;LineString></span>


            
            </td>

            

            

            <td class="description last">The current Segment being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometryIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Geometry being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>segmentIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Segment being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line4995">line 4995</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">void</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="segmentReduceCallback"><span class="type-signature"></span>segmentReduceCallback<span class="signature">(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Callback for segmentReduce

The first time the callback function is called, the values provided as arguments depend
on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:
 - The previousValue argument is initialValue.
 - The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:
 - The previousValue argument is the value of the first element present in the array.
 - The currentValue argument is the value of the second element present in the array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>previousValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The accumulated value previously returned in the last invocation
of the callback, or initialValue, if supplied.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>currentSegment</code></td>
            

            <td class="type">
            
                
<span class="param-type">Feature.&lt;LineString></span>


            
            </td>

            

            

            <td class="description last">The current Segment being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>featureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>multiFeatureIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Multi-Feature being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geometryIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Geometry being processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>segmentIndex</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">The current index of the Segment being processed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumVectorTile.js.html">CesiumVectorTile.js</a>, <a href="CesiumVectorTile.js.html#line5058">line 5058</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">主页</a></h2><h3>命名空间</h3><ul><li><a href="Cesium.html">Cesium</a></li></ul><h3>类</h3><ul><li><h5><a href="Cesium.html">Cesium</a></h5></li><li><a href="Cesium.Path.html">Path</a></li><li><a href="Cesium.VectorLayer.html">VectorLayer</a></li><li><a href="Cesium.VectorRenderer.html">VectorRenderer</a></li><li><a href="Cesium.VectorStyle.html">VectorStyle</a></li><li><a href="Cesium.VectorTileImageryProvider.html">VectorTileImageryProvider</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Aug 11 2018 22:22:52 GMT+0800 (中国标准时间)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>